# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

from scrapy import Item, Field


class CatItem(Item):
    name = Field()
    slug = Field()
    parent_slug = Field()
    url = Field()

# -------------------------------------------------- End class CatItem

class PackageItem(Item):
    name = Field()
    cat_slug = Field()

# -------------------------------------------------- End class PackageItem

class ManufacturerItem(Item):
    name = Field()
    cat_slug = Field()

# -------------------------------------------------- End class ManufacturerItem


## 商品详细相关

class ProductItem(Item):
    cat_slug = Field()
    model = Field()
    parent_model = Field()  # 商品是配件时需要用到
    url = Field()

# -------------------------------------------------- End class ProductItem

class SupplierItem(Item):
    model = Field()
    name = Field()
    logo = Field()

# -------------------------------------------------- End class SupplierItem

class StockItem(Item):
    manufacturer = Field()
    supplier = Field()
    model = Field()
    goods_id = Field()

    quantity = Field()
    minimum = Field()

# -------------------------------------------------- End class StockItem

class ParamItem(Item):
    """
    param 来自于 product/ajaxattr.html?goods_id=xxxxxxxx
    """
    goods_id = Field()
    param = Field()  # JSON 格式保存
# -------------------------------------------------- End class ParamItem

class PriceItem(Item):
    goods_id = Field()
    quantity = Field()
    hk_price = Field()
    internal_price = Field()  # 国内价格

# -------------------------------------------------- End class PriceItem


# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4
